package com.joca.scheduling.pages;

import org.apache.tapestry5.annotations.SessionState;

import com.joca.scheduling.entities.User;

public class Logout {

	@SessionState(create = false)
	private User user;
	private boolean userExists;

	public void setUser(User user) {
		this.user = user;
	}

	Object onActivate() {
		if (userExists) {
			setUser(null);
			return Index.class;
		}
		return Index.class;
	}

}
